//
//  NumericalDetailTableViewCell.m
//  ChinaA
//
//  Created by Evan on 2018/11/10.
//  Copyright © 2018 Evan. All rights reserved.
//

#import "NumericalDetailTableViewCell.h"

@implementation NumericalDetailTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

+ (instancetype)cellWithTableView:(UITableView *)tableView IndexPath:(NSIndexPath *)indexPath
{
    NSString *Service = [NSString stringWithFormat:@"NumericalDetailTableViewCell_%ld_%ld",indexPath.section,indexPath.row];
    NumericalDetailTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Service];
    if (cell == nil) {
        [tableView registerNib:[UINib nibWithNibName:@"NumericalDetailTableViewCell" bundle:nil] forCellReuseIdentifier:Service];
        cell = [tableView dequeueReusableCellWithIdentifier:Service];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        
    }
    return cell;
}

-(void)setViewData:(NSString*)strData{
    
    self.viewBg.layer.borderWidth = 1;
    self.viewBg.layer.borderColor = COLOR_main.CGColor;
    self.viewBg.layer.cornerRadius = 10;
    
    
//    self.txtView.text = strData;
    NSMutableParagraphStyle *paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle1.lineSpacing = 10;// 字体的行间距
    NSDictionary *attributes1 = @{
                                  NSFontAttributeName:[UIFont systemFontOfSize:13],
                                  NSParagraphStyleAttributeName:paragraphStyle1,
                                  NSForegroundColorAttributeName:COLOR_main
                                  };
    self.txtView.attributedText = [[NSAttributedString alloc] initWithString:strData attributes:attributes1];
}

@end
